#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from app import create_app
from app.models import Task

app = create_app()

with app.app_context():
    tasks = Task.query.all()
    print(f"数据库中共有 {len(tasks)} 个任务:")
    for task in tasks:
        print(f"ID: {task.id}, 标题: {task.title}, 状态: {task.status}, 优先级: {task.priority}")